 package es.ats.codington.festival.interfaces.services;

import java.sql.SQLException;
import java.util.List;

import es.ats.codington.festival.domain.Event;
import es.ats.codington.festival.exceptions.ServiceException;

/**
 *  
 * @author Codington_RED
 *
 */

public interface IEventService {

	 
	/**
	 * Service for displaying all the events
	 * @return List<event>
	 * @throws ServiceException
	 */
	public List<Event> getAllEvents() throws ServiceException;

	/**
	 *  Service for displaying all the events basing on eventName
	 * @param eventName
	 * @return List<Event>
	 * @throws ServiceException
	 */ 
    public List<Event> getAllEvents(Event eventName) throws ServiceException;

    /**
     * This service gets the event on basis of eventId
     * @param eventId
     * @return Event
     * @throws ServiceException
     */
    public Event getEvent(int eventId) throws ServiceException;

    /**
     * This service updates the event
     * @param event
     * @return int
     * @throws ServiceException
     */
    public int updateEvent(Event event) throws ServiceException;

    //public int deleteEvent(int eventId) throws ServiceException;
    
    /**
     * This service inserts a new event
     * @param event
     * @return boolean
     * @throws ServiceException
     */
    public boolean insertEvent(Event event) throws ServiceException;
    
    /**
     * This service checks if an event already exists.
     * @param event
     * @return boolean
     * @throws ServiceException, 
     * @throws SQLException
     */
	boolean checkEvent(Event event) throws ServiceException, SQLException;
	
	  /**
     * This service gets the id of an event
     * @param event
     * @return int
     * @throws ServiceException, SQLException
     */
	public int getIdEvent(Event event) throws ServiceException, SQLException;

	  /**
     * This service increases the available seats for an event
     * @param event
     * @return int
     * @throws ServiceException
     */
	public int updateSeatsEventDec(Event event) throws ServiceException;

	  /**
     * This service decreases the available seats for an event
     * @param event
     * @return int
     * @throws ServiceException
     */
	public int updateSeatsEventInc(Event event) throws ServiceException;


}
